<?php
if (!isset($_GET['request']))
{
    $request = 'list';
}
else
{
    $request = strtolower($_GET['request']);
}

if ($request == 'list')
{
    $jsonFile = 'smiles.json';
    header('Content-Type: text/javascript');
    echo file_get_contents($jsonFile);
}
elseif ($request == 'script' || $request == 'js')
{
    header('Content-Type: text/javascript');
    echo file_get_contents('js/fbsmile.js');
}
elseif ($request == 'css' || $request = 'style')
{
    header('Content-Type: text/css');
    echo file_get_contents('css/fbsmile.css');
}